how can I deploy legacy code ( build using .net framework 4.6) in iot edge device as module? - azure-iot-edge

I have a code written in .net framework 4.6 which talks with a device (non iot, non IP) and reads data. I want this data to be sent to Azure IoT hub.
so instead of using Azure IoT Device SDK in it, and running it as a simulated device, I want to create IoT Edge module, so lifecycle management of this app will come handy.
But when I create new C# module in VS 2017, it forces me to use .net core 2.1. Is it possible to create Azure IoT Edge custom Module using .net Frameworks. and if yes, how ??

When you create a module in VS or VS Code, they assume you want a 'traditional' (and cross platform) module. So .NET Core is the only choice (for the cross platform part). However, if you only want to use IoT Edge as a deployment/lifecycle mgmt vehicle, than you can build your own docker image independent of IoT Edge, yet deploy it through the IoT edge manifest. This link talks about containerizing a traditional .NET app, which you should then be able to deploy with IoT Edge (it just won't 'talk' to ioT Edge). We've done similar (non-iot-edge module) kind of things with stuff like influxdb, grafana, redis cache, etc. We deploy and manage their lifecycle with IoT Edge, but they don't really talk to/through IoT Edge.
Note that if you create a container as mentioned in the article, you will be limited to running IoT Edge on Windows with Windows containers.

Related

Hosting Box2D MMO: Photon vs Lidgren vs GameSparks vs PlayFab

I'm developing a game written in C# which utilizes a custom Box2D/Farseer implementation and is multiplayer based on the low-level Lidgren library. It has a few requirements:
- Box2D must run on the server, along with other custom game logic.
The server will be authoritative.
Game is real-time, not turn-based.
I'm okay rewriting the networking to use a more premium platform, but I need help understanding which route to take. I could simply host my existing Lidgren-based server as a Windows Service on an AWS EC2 instance. This is actually what I'm currently doing. However, I've heard that going with a service like Photon will be much more performant. PlayFab and GameSparks may also provide this networking ability, but it seems they're mostly about account management, not transferring game object data.
Ideally, PlayFab or GameSparks would allow me to do everything -- run my custom C# server exe, integrate with their account API, and prove me a very performant networking library to use in place of Lidgren. I've found it difficult to determine if they do. It's a bit spotty.
Which is the best platform to host an MMO as I described?

IOT with MEAN - Together

MEAN stack and IOT are the current trending hot topics. Can these two be used together? If yes then in what way?
How can these technologies be used together?
Sweta.
By saying MEAN.js you are including things that are not strictly in the IoT terrain. Angular for example has little to do with anything.
On the web front end you need to implement a javascript library like Paho.js that will use the MQTT protocol to connect to a broker and start aggregating messages from connected devices.
Express has little to do as well as you are not exposing a Restful interface but connecting low level through a broker. A good solution in Node.js is Mosca.
Mongo is good for dumping data from devices.
I have written a tutorial using Node.js and iOS so have a look and you might find it interesting.
Mean stack is the combination of the frontent web frameworks like angularjs,emberjs,knockoutjs,backbonejs , javascript's backend server called nodejs and using the mongodb at top. so using these frameworks and library will make a mean stack developer.
IoT pronounced as Internet of things. iot is recently used for connected electronics devices .basically it is a form of running your program inside the electronic chip and mostly trying to connect the devices.making control on devices using the programmed chip. there are separate IDE's are avaialble for developing and testing the programme on embeded chip.
you can use angularjs as a frontend(making your GUI) for your IoT'S application.
Yes, you can.
As a fact is has been done before. And in other frontend frameworks too. Here there is an example for home automation.
You can find even a yeoman generator for such projects here.
[Disclaimer: I work here] Netbeast started managing devices and creating a system of plugins on top
of a MEAN app and RESTful communications. (Now we use a MERN
stack, with react and MQTT over websockets to control networks and
update values in real time.)
To mention other places where you can find examples of current projects using MEAN to run IoT networks I encourage you to join angular, arduino and raspberry communities, as well as taking a tour over producthunt.com, hackster.io and other maker sites such as the previously mentioned Netbeast forum.
Yes you can make an IoT platform with the MEAN stack. Typically the sensors are low cost sensors and are constantly transmitting small amounts of data in MQTT or TCP protocols. With Node.js you can write, servers for such applications very easily.
Mongo is useful if you have unstructured data, which could happen if you work with multiple sensors. If you don't need unstructured data structures, SQL is sufficient.
All the data that you get from devices, finally needs to be consumed via applications. Express and Angular are great platforms to manage web applications.
You can read a little more about IoT platforms in MEAN at http://blog.yatis.io/scalable-iot-platform-mean-stack/

Most cost effective way to deploy iOS app with Xamarin with only a Mac?

I have a strong background in .Net and some Python. After years of PC work, my primary (only) machine at home is a Mac.
I have an idea for an iOS (and Android) app that would be a total labor-of-love, there is basically no monetization possible with it, but I still want to do it. What is the most cost effective way to deploy an app, with Xamarin and only using a Mac?
I will need a database to power the app. I know that I can use MS Azure for a pretty low cost but I know that Xamarin licensing for the SQL Data library is a total budget killer. I know that I could expose web services, but that would require writing the web services with .NET and I want to do this project exclusively on a Mac.
So what are the database options? Can I hook Xamarin directly to MySQL? Can someone please provide sample code for connecting from Xamarin to MySQL? What are some of the better MySQL only providers? I wouldn't need a web host, just DB.
Are there any other potential costs/licenses that I'm overlooking?
You never want to expose your database directly to a mobile client. You always want to have some sort of service brokering your db requests to the outside world.
If your client is simple enough that it will fit under the app size limit, you can use Xamarin's free tier. Otherwise you can use the Indie tier. You should not need the business tier. If this is something that might be a workable open source project, I believe you might be able to ask Xamarin to donate a license.
You will also need an Apple developer license, $99/year, for deployment.
You can use MSSQL, Azure, MySQL, etc to power the server side db. You can write webservices with ASP.NET, PHP, Ruby, etc - there is no reason the server side has to be .NET unless that is what works best for you. You can run a VM on the Mac and run VS2013 Express for ASP.NET, or do it directly from the Mac with Xamarin Studio (not sure exactly what level of support there is for this under Mono, but it is doable). Most of the other options can be written natively in OS X.
Other than the Mac hardware, the only other absolute expense is $99 for the Apple Developer account.
For web services on a Mac with C#, look into v3 branch of ServiceStack. There is also ServiceStack.OrmLite which is a database client (MySQL, SQLite, SQL Server etc), it has a SQLite implementation which will run on the local machine (mobile) with Xamarin.iOS & Xamarin.Android.

TFS SDK on Surface RT

I'm trying to make an application that will allow a user to initiate builds, see build info etc, and just general TFS based actions.
I've found a few guides on how to use the SDK... http://msdn.microsoft.com/en-us/library/bb286958.aspx
But I can't use the TeamFoundation.*.dll's in the metro/win8 app... http://msdn.microsoft.com/en-us/library/windows/apps/br230302(v=vs.110).aspx
so, is there an alternative? Do they have a separate api? (you can access a tfs project via the web access, providing a web based alternative from doing it all in visual studio).
Thanks,
james.
Windows RT is an ARM based surface and the TFS SDK/OM is only available compiled for x86. So, it will not work.
Windows Surface PRO available later will be x86 based.
The closest you could probably get is if you coded directly to the SOAP web service layer directly. The TFS team is also starting to create RESTful http APIs with light http clients but that's a work in progress that's just starting. That would be the long term approach available someday.
If you're creating a Windows store app, you should note that it's sandboxed. The TFS team is looking into that as we transition toward REST and a more modern REST client.

Host ServiceStack, MVC3 or MVC4 on mono or windows and what is the state of mono

I am trying to decide what stack to use for a new web based backoffice system. We develop in C# and are going to use ServiceStack and/or ASP.NET MVC. Our customer prefers hosting on a Linux server, so this rules out MVC4 as this is not supported by Mono.
Additionally we are worried about the state of the mono-fastcgi-server needed to run ASP.NET on Mono because of posts like this https://serverfault.com/questions/330298/stopping-fastcgi-mono-server-gracefully-website-content-updating-with-no-need-t and because we find it very hard to find relevant and up to date information about the state of the project. Therefore we hesitate to use MVC3 on mono as well.
Right now we are considering using ServiceStack (with the new Razor views !) hosted in a console app behind and NGINX reverse proxy. This seems work fine and the ServiceStack documentation indicates that this is a viable solution. But what about Mono? Is it stable enough for serious production sites and services, is the garbage collector performant etc? Does anyone have up to date experience with hosting busy server apps (console apps using httplistener) on mono - if so, how does it work, would you recommend it? what version of mono did you use?
Our alternative is to force our customer to accept a windows server, and then we will use service stack or perhaps mvc4 combined with service stack.
So to sum up, what would you do/consider and what are your experiences with hosting servers apps on mono?
ServiceStack.net has always run on Linux/Mono
Note all live demos hosted on servicestack.net are running on an Ubuntu linux vServer. servicestack.net has always been hosted on Linux/Mono for years, in-fact before moving to an Ubuntu vServer from hetzner our old CentOS server had an up-time of 480 days. We consider Mono an increasingly important platform to support as we expect the advent of linux-only clouds to be an important competitive advantage since it allows you to scale at $0 software licensing cost.
Developing on Windows with VS.NET and deploying to Mono/Linux
For all of ServiceStack live demos we develop on Windows with VS.NET but we git-deploy and build and host on Linux. As outlined in our Release Notes we take special care to support Mono as a first-class citizen where we apply normalizing behaviour as much as possible so porting an existing IIS/ASP.NET site remains trivial (i.e. you should be able to copy and run the binaries as-is!) - this extends to the external dependencies we adopt which are influenced by their support of Mono.
All demos including the Razor Live demo is hosted on Mono/Linux
All ServiceStack demos are hosted on Linux, this includes the Razor example which has 2 versions deployed and hosted on Mono, i.e.
razor.servicestack.net - ASP.NET Hosted live demo powered by Linux / Nginx / MonoFastCGI
razor-console.servicestack.net - Self-Hosted Console App hosted behind Nginx Reverse Proxy
You may want to look at this question for different ways to host ServiceStack on Linux.

Resources