Profile

Cover photo
Robert Åkerblom-Andersson
Works at DartVoid
Attends University of Umeå
Lives in Umeå
289 followers|25,120 views
AboutPostsPhotosVideos+1's

Stream

Robert Åkerblom-Andersson
moderator

Discussion  - 
 
Update, breaking change to app.yaml syntax and new features!

First off, yesterday I change a little bit how you configure handlers in  the app.yaml file. I did a small change in that "controller" is now called just "handler" instead. Initially the class you extended in Vane was called Controller and the name came from there. Later I change it to just Vane to avoid confusion since Vane is not a MVC framework and the name Controller might be associated with MVCs. Because we have invited so few developers so far and it's an easy change I think no one should be harmed by this change. 

You can see this commit as a reference, you can just edit it online at Github and DartVoid will autodeploy your app when you commit (to avoid deployment on commit set the variable "deploy" in app.yaml to "false"):
https://github.com/DartTemplates/Vane-Hello-World/commit/8f1035fefc6b0a2fea162261bdb0e64a051ae2da

Second, a new (non breaking) feature! You can now specify simple function handlers in your app.yaml that don't use Vane and rather just just http_server. You can always skip our generated server.dart file (based on the http_server package) completely and write your own.  But if you do use Vane or just normal function mapping in the app.yaml then Nginx will do the routing for you (good for performance) and you don't have to write a server and lots of routing code for each app, rather just focus on your app instead. 

To use a simple function served by our generated dart http_server you would do something like this (using shorthand ":" syntax for the config, shorthand syntax is not new but we need to update the app.yaml documented):
- url: /myFuncHandler
  function: GET:my_code.dart:myFuncHandler

void myFuncHandler(HttpRequest req) {
  req.response.write("Hello World from func handler!");
  req.response.close();
}

Third, I made it so that you can specify different handler on a Vane class instead of forcing you to always use main (I will update pub package tomorrow). Main is still the default handler function that is run if you don't specify a different one and/or if you run the class as a middleware handler. But if you want to, and I think you quite often do, you can specify a specific handler function for each operation on a rest resource for example. It's a very nice improvement it you write something like a REST service (I'we been doing just that the last couple of days) .

An example looks something like this in app.yaml (shorthand syntax):
- url: /todos 
  handler: GET:todo.dart:Todo.getAll 

And the "getAll" function is a function declared on the "Todo" class that returns a future. Just like main but you can choose the name and in the same class you can also have different functions that can be mapped to other url patterns, for example one for adding a new todo item (more examples of this will come in the upcoming days):
- url: /todos 
  handler: POST:todo.dart:Todo.add

Fourth, we have a new websocket chat example up on the template site. You can fork that and test it directly from the DartVoid dashboard. Feel free to give feedback and if you want to you can also send a pull request. The server code is very simply and only 30 lines:
https://github.com/DartTemplates/Vane-Websocket-Chat/blob/master/server/chat.dart

Note: On DartVoid websockets works out of the box as standard. You don't have to do some special setup or enable it, it just works... :) 

Fifth, we have a new Todo example that is very close to be finished. I have been working on it the last couple of days and it is build with some interesting technology and patterns that I think will be useful as examples. AngularDart for client side, Vane for serverside, communication with REST interface, sharing an single Item class dart file between both server and client code. Some of the app.yaml examples above comes from that code and hopefully it will be up on the template site sometime tomorrow. 

And last but not least we have fixed some stuff on our Dashboard/Manage application based on the feedback we got. It should no be more clear on the signup page (where you choose your DartVoid username) that the username become a part of your own unique url namespace. We have also made it so that the repo list is fetch each time the create view is showed, that was a bug found by one of our testers. 

Time to sleep... 
3
Add a comment...

Robert Åkerblom-Andersson

commented on a post on Blogger.
Shared publicly  - 
 
Interesting post, it sure is a nice setup with Nginx+Dart+Mongo... 
4
Matthew Butler's profile photoRobert Åkerblom-Andersson's profile photo
2 comments
 
I couldn't agree more. DartVoid has a very similar stack to what your using, and we have been using it for a while. In the long run we would like to support more databases but mongodb will come out of the box from day 1. Will be fun to see what you think of it! We're doing some of the last testing right now. 
Add a comment...
 
Hi,

Has anyone in here tried FreeBSD on Azure? Now with FreeBSD 10 and Hyper-V support integrated in the base system it should run good I guess, but have anyone in here tried it?

I tried myself yesterday to upload and run the FreeBSD 10 RELEASE VM snapshot: ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/VM-IMAGES/10.0-RELEASE/amd64/20140116/

But unfortunately the size of the image was not in even MB, so it failed because of that. I have plans to build an image myself and try it but so far I have not gotten the time yet. 

So, any experiences with Azure? 
1
Add a comment...
 
Microsemi updates the Igloo series of FPGAs with Igloo2.

The two biggest changes I notices was:
* New node, goes from 130 nm with Igloo to 65 nm with Igloo2.
* The old "VersaTile" is not replaced by a more "industry standard like" 4LUT based logic block solution.
* Some new hard IP for memory, communication and the likes
* New bigger logic elements range 6,060-146,124 (LUT4 + DFF)

For people not familiar with the Igloo/ProASIC3 families the biggest differentiator is the fact that they are build on a Flash process, compared the common SRAM. The Igloo family was also very small in packages sizes, same architecture as ProASIC3 but smaller packages. Some pros of the flash process is that no external memory is needed for the bitstream, you get a fast startup and low power consumption. They also have a "flash freeze" function that works more or less like the sleep function on your PC, if used correctly a MCU can "freeze" the FPGA at times it's not needed to save power without completely shutting it off. In theory a great feature, not sure how much it can be used in practice. Possible drawbacks, I think, would be that the flash process should in theory be slower. I don't think you can run them as fast as SRAM based FPGAs but would be fun to hear if someone have compared them, just reading some datasheets might give a good hint. The biggest device is still not as big as some from competitors. The Libero tools might not be as good as Xilinx and Alteras, just my opinion, but best is to try it out yourself.. Price wise I'm not sure how the prices weigh up, always hard to compare in general...

Interesting devices either way, I like what I see, a subsidized devkit for $99 will become available in September (standard price $300), looks like a nice devkit. 

12 minute video introducing the new line, a little bad sound but otherwise good video:
http://soc.microsemi.com/videos/IGLOO2_FPGAs.html

#FPGA   #Microsemi   #Igloo2  
3
Torsten Meißner's profile photoRobert Åkerblom-Andersson's profile photo
3 comments
 
Yeah. I hope the smaller form factors will come quite soon. They are very interesting when you don't need the microcontroller subsystem of the SF2.
Add a comment...
 
Man, testing is fun when things work!

Just spun up 10 backend Dart workers with a few REST calls (10 to be exact..). Then abused them with some F5 terror.. :P At the same time I watched in a separate window how each of them created multiple new connections and saw how they simultaneously worked off the requests...

Sure each of them did not do anything spectacular, just an HTTP request of google.com from server side, but still really cool to see it working... :D

#dartlang   #dartvoid    
7
Chris McClelland's profile photoRobert Åkerblom-Andersson's profile photo
2 comments
 
+Chris McClelland, sure I agree. But when you have been working on something for a very long time, seeing that particular test work for the first time, beats finding interesting bugs any day... ;) 
Add a comment...
Have him in circles
289 people
Karl Lindmark's profile photo
Nikhil Vyas's profile photo
Tyler Michel's profile photo
Billy Go's profile photo
Thomas Løcke's profile photo
 
At this point there are lots of information that we want to get out there, and we will try to catch up during the week. More documentation will come tomorrow, so far we have not invited that many developers but we'll invite more tomorrow.

We had a small but yet good start today and got some good feedback! We have built up so long for this release so now it feels good just to have it out of the way.

If anyone tries to port an existing Dart app (before we write up a proper tutorial on how to do it) you could check these changes out of how we got +Claudio d'Angelis's existing Dart app to run on DartVoid in a couple of minutes. In total it was a diff of +25 and -2 rows:
https://github.com/Scorpiion/dartchat-demo-codemotionroma2014/commit/fabc4a5d6c5ce843a6ac339f26c7e6b82ca6f320
https://github.com/Scorpiion/dartchat-demo-codemotionroma2014/commit/c60537649a0c1d05c3d4234b448a9e89e0d703fd

Here comes a short summery of how to structure an app to run on DartVoid:

1 server dir
1 client dir
1 app.yaml

In the server and client dirs you keep two separate Dart projects with their own pubspec files. DartVoid is a PaaS and can run pretty much any server side framework. We have developed one on our own that is called Vane, and the first two example templates are written with Vane. But DartVoid does not require you to use it, it's just one out of many choices you have. 

Here are the example repos that you can fork and auto create an app from in the dashboard (we plan to add more example there):
https://github.com/DartTemplates

If you choose to not use Vane you should bind to 127.0.0.1 and find the port number from the environment (see the commits above for example). You need to add a framework parameter (any framework name is okay really, right now only "vane" is different since it's server.dart file is auto generated when you deploy your app). Name you dart server file "server.dart" and put it in the root of the server dir.

With each app there is also a Mongodb database created for you automatically. The easiest way to access it is with Vane and you can see examples of that in the guestbook template. If you don't use Vane you can find your mongodb URI on the environment variable called "MONGODB_URI" (eg. Platform.environment['MONGODB_URI']) and use the mongo driver from pub.

I have started to document Vane here, it's not complete but at the same time it's quite extensive compared to some other projects:
http://www.dartvoid.com/vane

There a lots of examples there on how to use both Vane, mongodb and middleware handlers. There are also examples of how to receive files and how to use websockets and etc. 

Lots of information to get out there as I said, but we have to take it a little bit at a time. More stuff comes tomorrow, time to get some sleep now!

An extra thanks to +Matthew Butler and +Claudio d'Angelis for some good feedback and chat earlier tonight!

#dartlang   #dartvoid  
4
1
Robert Åkerblom-Andersson's profile photo
Add a comment...
 
In honor of the day I give you the Nilakantha series in Dart! 

void main() {
  // Start value (also the first plus iteration)
  double pi = (3.0 + (4.0 / (2.0 * 3.0 * 4.0)));
  
  // Show pi for first iteration
  print("0.0 $pi");
  
  // Calculate pi by doing minus, plus, minus, plus, minus... 
  for(int i = 4; i < 24; i = i + 2) {
    if(i % 4 == 0) {
      pi -= (4.0 / (i * (i+1.0) * (i+2.0)));
    } else {
      pi += (4.0 / (i * (i+1.0) * (i+2.0)));
    }
    
    // Show pi for each iteration
    print("${i/2 - 1} $pi");
  }
}

#dartlang   #piday  
6
Add a comment...
 
Hi,

What is the best way to download an older release of the Dart SDK?

I remember before that I could find urls for older releases but can't seem to find any now. If I want to download Dart SDK 1.0 for example, is that release still available somewhere?
1
Anthony Bobenrieth's profile photoRobert Åkerblom-Andersson's profile photo
2 comments
 
Thanks +Anthony Bobenrieth, that was exactly what I was looking for!
Add a comment...

Robert Åkerblom-Andersson
moderator

Discussion  - 
 
Something that irritated me and that lowered my view of
+latticesemi as a brand was when I saw that they removed their old videos from Youtube!

To be honest, most of embedded tech companies videos suck, many of them are really terrible. And I have watched lots of them... But then there were something like 2 videos from Lattice Semi that really stuck out, that were funny and that made an interested person like myself to post about the video on social networks like Google plus. Then Lattice removed those videos? Why? Sure maybe not everyone find them as funny, I get that. However it does not matter, if you put a video out there you should stand up for it and not put it down.

Well, maybe I'm overreacting a bit, I don't know. I'm just disappointed, those videos gave me a better view of Lattice as a company, that they had a sense of humor. These actions somewhat gives the reverse effect and then some. Why remove the funny videos?

On a sidenote, apparently element14 have reposted the videos, not sure if it's with or without permission, but the sound is quite bad and it does not effect the actions of Lattice's marketing department.
1
Gord Wait's profile photoTorsten Meißner's profile photoBen Twijnstra's profile photoRobert Åkerblom-Andersson's profile photo
7 comments
 
Despite being not half as well-integrated as the X and A offerings I found the tools working pretty well. After a few hours of complaining to myself that I wasn't in a Rolls Royce I realized I hadn't had a single crash and was getting decent results on both my Win7 main box and my Win8 laptop.
Add a comment...
 
Could not agree more, they have done it again!

JavaZone (Norwegian Java conference) has the best tech conference promotional videos in the world! Well done!
 
LOL. My hat's off to JavaZone crew... once again. Best trailer ever.
2
1
Songhun Kim's profile photoDamon Douglas's profile photo
 
This is so well done!
Add a comment...
People
Have him in circles
289 people
Karl Lindmark's profile photo
Nikhil Vyas's profile photo
Tyler Michel's profile photo
Billy Go's profile photo
Thomas Løcke's profile photo
Work
Occupation
Computer Engineering student at Umeå University
Employment
  • DartVoid
    Founder, Chief Software Architect and Developer, 2012 - present
  • Remro
    CEO and Computer Engineer, 2011 - present
  • Umeå University
    Student, Elite Athlete, 2008 - present
  • SAS Stomz
    Radio Technician, 2006 - 2011
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Umeå
Previously
Skepptuna - Skepptuna - Åsarna - Umeå
Links
Other profiles
Story
Introduction
A digital enthusiasts with main interests in system level programming, Programmable Logic, Program languages, Operating Systems, Embedded Systems, Networking, RF.
Education
  • University of Umeå
    present
  • Skepptuna
  • Ekilla
  • Bergs Gymnasium
Basic Information
Gender
Male
Robert Åkerblom-Andersson's +1's are the things they like, agree with, or want to recommend.
AngularDart
plus.google.com

AngularDart is a Web Framework for Dart!

Chromium Blog: Ecma forms TC52 for Dart Standardization
blog.chromium.org

This week Ecma created a new technical committee named TC52 to publish a standard specification of the Dart language. We're excited about th

Patterns in Polymer
plus.google.com

Blueprints for in the Real World

Dart Web Development - Google Grupper
groups.google.com

Dart Web Development. Visar 1 – 3 av 3 ämnen. Polymer leftovers, robbishop65, 12:26. Re: [web-ui] how to best use pub serve, jmesserly, 12:1

Angular Announces AngularDart
news.dartlang.org

Today the Angular team announced the beta release of the AngularDart framework, their port of Angular to Dart. AngularDart is heavily inspir

Top 5 Live Websites Already Using The Dart Language
divingintodart.blogspot.com

The Dart is still heading towards that magical 1.0 release but that is not stopping pioneering developers using the language. It is not just

Chromium Blog: Experimenting with QUIC
blog.chromium.org

At Google, we're always working to make the web faster. The SPDY protocol, which is now the foundation of the upcoming HTTP 2.0 protocol, is

Release Notes for Dart's Beta Release
news.dartlang.org

Today's release of the Dart SDK and Editor is the first beta release, and contains performance and productivity improvements across the plat

The Dartosphere
www.dartosphere.org

‹prev | My Chain | next› Some time ago, I found that my application cache-based code editor did not actually cache the application. The prob

Stack Exchange
plus.google.com

Making the Internet a better place to get awesome answers

Microcontroller | MCU - Texas Instruments
www.ti.com

Microcontroller | MCU from Texas Instruments. MSP430™ ultra-low power, TMS320C2000™ real time, Stellaris® ARM® Cortex™-M3, and Hercules safe

Dart: Structured web apps | DartLang.org
www.dartlang.org

Dart is a new platform for building structured web apps for modern browsers. It includes a language, a virtual machine, libraries, a UI fram

Mycket svenskt i Galileos premiär
www.etn.se

Nyheter för den svenska elektronikbranschen.

Tryckt minne adderar logik
www.etn.se

Nyheter för den svenska elektronikbranschen.

Svenska inbyggare mötte Android
www.etn.se

Nyheter för den svenska elektronikbranschen.

EU begränsar priset för utlandsroaming
www.etn.se

Nyheter för den svenska elektronikbranschen.

Små PIC32:or för audio
www.etn.se

Nyheter för den svenska elektronikbranschen.

Premiär för Sveriges första solcellsfabrik
www.etn.se

Nyheter för den svenska elektronikbranschen.