Raba - Defend your code RSS 2.0
# Friday, December 19, 2008

Dev Academy 3 just finished, but if you feel you missed a lecture or maybe missed the whole day, you can sit back download the code and full length lectures.

You can find everything in here http://www.microsoft.com/israel/msdn/devacademy3/2.aspx.
Pay attention: while the presentation were written in English, the session all of them were in Hebrew but you can also enjoy the code.

I  recommend on this lectures:

  • Dev301, Eyal Vardi lectures about Http Web Services: Great performer, good subject, lots of code
  • Dev 402, Sasha Goldshtein lectures about Concurrent Programming: I didn't like his style, but still some great samples.
  • Arc 301, Yair Siwek lectures about "Velocity": Great performer, funny guy. You must watch this session.

Enjoy.

Friday, December 19, 2008 4:04:19 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
.Net 3.5 | Life | WCF

For the last 3 months we suffer from many problems on our ArcGis-Servers.
The main problem is our architecture which planned on 4-cores (dual) + 12 GB RAM, but the main problem is that our server holds Win2003-32bit, which can handle only 4GB RAM.

This lack of 8GB causes us many page-faults. our SOC.exe causes our server to hold the server on 4 GB RAM permanently. (which means 100%)

 

Of course That we first need to extend our architecture to have more Spatial-Servers to deal the pressure but it will take time till buying and installing new servers, in the meanwhile we are trying to figure out creative ways to decrease the RAM Usages.


Yesterday Mody (from Systematics, ESRI's representative in Israel) sent me this link:

http://webhelp.esri.com/arcgisserver/9.3/dotNet/index.htm#tuning_services.htm (read the recycle section)

The article is talking about the 9.3 version (while we are using the 9.2 sp1) but it still help me understand something about how the people at Redland think.

 

Quote from the Recycle section: "Recycling destroys and re-creates all running instances of a service, whether or not those instances are above the minimum specified. To periodically return the number of running instances to the minimum specified, the service must be stopped and restarted."

It says that the recycle:

1) Will re-create all instances - which means that the "in use" number will be set to 0 - on every recycle.

2) It won't Change the number of "available instances" to the minimum (for example if we set minimum=4 and maximum=8, and before recycle the available=5, after recycle it will still be on 5)

 

Pros

  • ESRI's idea says that If your machine sometime had 5 users instead of the 4 you planned - so the machine needed to create the new instance. Such scenario can happen again, so They won't kill the instance at your recycle. and the next time you will need the 5th instance all the machine will have to do - is take it (without paying the creation time)

Cons

  • Machines that holds many types of Server-Objects and each of them will grow up above its minimum, it will cause the machine to work very slow, cause each instance take more memory, While the idea that the 5th user will return it more obvious that not all server-objects instances will be back to their high level usages.
    More instance -> Needed more CPU, even if they are not in use -> machine will work slower even with no less users.

 

My New Feature request:

I would like to have  recycle-preferences\options, For example: I would like to choose between two types of recycle:
The first type -  recycle and re-init the available instance to minimum.
The second type - recycle only. (like the one exist today)
Moreover, I would like to set more than one recycle item per server-object.
For Example:
I can set two recycle items: the first recycle will be twice a day and won't change the available instances(the second type), while the second type will be once a week, and will set the available instances to the minimum.

 

Enjoy.

Friday, December 19, 2008 12:08:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
GIS | ArcGis Server | Software Development
# Friday, November 07, 2008

After installing the TeamCity it creates the Data Directory in the user profile (c:\document and settings\[username]\.buildserver).
The .buildserver directory holds each of your project's configurations and project's output (artifacts). After a month of using the TeamCity we found out that the relevant user (the one that installed the TeamCity) profile become very huge which caused him almost 15 minutes for each logon (Loading the profile).

I tried changing this path using the TeamCity Web Site, but there you can find the parameter TeamCity.Data.Path as read-only.
After reading a little bit, I found the Tomcat6w.exe command.
Here are the actions for changing the path:

  • run this command: 
   1: C:\TeamCity\Bin\Tomcat6w.exe //ES//TeamCity
  • a configuration window will be opened, now you can find there some parameters that can be changed only on starting the service
  • at the "Java Options:" text box, you will find the TeamCity.Data.Path parameter, change it to your your wanted directory, for example: C:\BuildServer

Pay attention that you need to restart the service for causing the new parameters to be initiated.

Friday, November 07, 2008 7:21:10 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] - Trackback
Build Server | Agile
# Saturday, August 02, 2008

After almost two years on Pasha's shared host (ServerGrid) I've finally got my blog to have its own home, I am hosting on GoDaddy.com.
{Pasha - thank you for everything}

What's new:

  • new host server
  • new theme
  • new dasblog version (2.1)

Things to be done (or: still to fix):

  • broken links - Images are not located at the right directory
  • blogroll - I had the default blogroll which is not my real reading list

I am looking forward to hear you comments.

Saturday, August 02, 2008 4:13:25 PM (GMT Daylight Time, UTC+01:00)  #    Comments [4] - Trackback
Life | My Site
# Friday, May 30, 2008

You can find me here. Not so sure what I can do with this, but I must try this before saying something bad about it...

Friday, May 30, 2008 3:29:58 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
Life | Software Development

I had the honor meeting Tom Brown, here in Israel. Systematics (the representative of Esri in Israel) bring him to three days. On Wednesday Tom gave a lecture about SDE- new features and Performance and on Thursday he had a one-on-one meetings. I hope Tom will publish his presentations so I could link it from here.

Here are some tips I've learned from those two days:

Register all your tables
You might register all your tables with ArcSDE using sdetable -o register (even the non-geo-layers), this will add a row to the GDB_OBJECTCLASSES. The main reason is optimizations, for each time the ArcObject api will try to access your tables\layers he won't need to search for it all over the tables-dictionary.

Do NOT overload feature datasetes just for managing it better. You probably ask why? This is because when editing and browsing the layer it will initialize all the classes underneath the dataset. use this only for Topology and Geometric Networks.

Profiling your SDE (enabling sdeintercept)

you can enable it as a client or maybe as the server, I'll probably use it in my ArcGIS Server, so  for me I need to install the SDE client libraries, after installing you will need to set the sdeintercept variable, you can put this line in a batch file and run it whenever you need it:

   1: set SDEINTERCEPT=crwtf 
   2: set SDEINTERCEPTLOC=D:\tmp\sde_server

Intercepting the operations to SDE will create a huge file so it will be a good practice to enable it for a specific operation, watch the file to understand what happen clear it and start over again for another operation. I didn't try this yet, but I will publish more on it whenever I found more time.

Move edits to base option (Versioning-workflow)
We all know the Versioned and the non-Versioned pros and cons, ESRI give us new option, now we can work like a versioned option, but still our data will be save and accessed as non-versioned (with one DEFAULT table of data). you will be able to query the main table using simple SQL and without the need for Compress it from time to time. this model called the Move edits to base option (aka: Hybrid model)

Geodatabase and Raster's archiving
At my project we handle a huge processes of loading large Rasters to the SDE, this operation can take some time but the main problem is that your database is archiving each bit to help it recover failures. Archiving operations cause the redo-log to grow and blow, which cause us to turn off archiving. Tom also showed a command for turning off the archiving. At Thursday he thought loud of another idea, that, maybe, in the next versions the loading of Rasters will be using direct write which will bypass the redo logs.

Spatial Types
Oh boy, this is a syntactic sugar, from the 9.2 versions (oracle) you can write such bunch of code

   1: SELECT sa.name "Sensitive Areas", hs.name "Hazardous Sites" 
   2: FROM   sensitive_areas sa, 
   3:        hazardous_sites hs 
   4: WHERE  
   5:        ST_Overlaps (sa.zone, ST_Buffer (hs.location,.01)) = 1;

 

   1: INSERT INTO hazardous_sites 
   2: VALUES (1, 102, 'W. H. Kleenare Chemical Repository', db2gse.ST_PointFromText('point (52 24)',1)

 

You can extend your reading here.

Two tips for the next versions:
TDDer prespective:
Testing spatial queries is hard but important, as you can see the query above there are many scenarios:

  • point inside an area
  • point outside the area
  • point on the area border

Here I would be more than happy to have a test table to see the results, and to give a better readability for the next programmer who would like to run my query.

Keep it simple:
As you can see the insert statement I need to know the next number for insertion it is also connected to another table in the database. I don't want my programmers to bother about this index, as I see this it can be solved by adding an automatic triggers while registering the layer as Geodatabase.

Friday, May 30, 2008 2:37:18 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
DataBase | GIS | SDE | TDD
# Saturday, May 17, 2008

This Where 2.0 video is a must, for all of you GIS users, managers and GIS-evangelists.
(you can also read and view it in those links:  at Chris Spagnuolo's post or at James Fee's post)

I've also recommend reading Dave's post (this post inspired by him) and I agreed with him about the GIS-buzz that will give benefits for everyone.

From now on, you can take your blog\home\web-site\news-reader geographic information and put it on a maps, I am not sure what is the benefit, but you can do this. Who is going to use it or watch it?!
Instead, try thinking about an already-exists-application that handle deliveries between warehouses and try to locate its trucks and warehouses on a map, such idea will probably have more users. It will be more complicated cause this objects don't have a GIS metadata and it is also not so easy to give them those details, for example: the DB is already created without X and Y parameters, there is no country\place indicator in the warehouse field. moreover, we want to have a geo-processing utility which retrieve the shortest-path between those warehouses (in Israel roads, which have their own Business Logic - such as: different spatial reference, new roads, traffic-jams etc.)
For such operation we will probably need a GIS expert to create all those services for the end-user mash-up. after everything will be ready, we could simply mash-it-up together.

The main problem that the experts (those who will create the services) are looking for something more accurate, while the mash-up users are looking for a simple Geo-Knowledgeless API.

For example, The Google API looks like this:

new GLatLng(34.019968,-118.289988);

It actually looks enough for most users and application, but for the GIS-experts it looks ridiculous.
For those who still didn't understand what I mean, it is the same like saying "I am just 10 xxx from you house" - so 10 what? is it meters, is it kilometers or maybe you are talking about minutes ...

Here is a better approach for a point(*).

    public class Point : Geometry, IPoint, IGeometry, ICloneable, IComparable, IComparable<IGeometry>, IEquatable<IGeometry>
    {
        public Point(ICoordinate coordinate);
        public Point(double x, double y);
        public Point(ICoordinateSequence coordinates, IGeometryFactory factory);
        public Point(double x, double y, double z);

        public override IGeometry Boundary { get; }
        public override Dimensions BoundaryDimension { get; }
        public override ICoordinate Coordinate { get; }
        public override ICoordinate[] Coordinates { get; }
        public ICoordinateSequence CoordinateSequence { get; }
        public override Dimensions Dimension { get; }
        public override string GeometryType { get; }
        public override bool IsEmpty { get; }
        public override bool IsSimple { get; }
        public override bool IsValid { get; }
        public override int NumPoints { get; }
        public double X { get; set; }
        public double Y { get; set; }
        public double Z { get; set; }
    }

The default Lat,Long lack the coordinate system. We can see (in the second sample for point) the ICoordinate. you can also have Z parameter.
Pay attention to the Point Constructor with only (double x, double y) as parameter, this is pretty much the same as the GLatLng object. which probably use the WGS84 as its default.

I am not sure what Google are trying to achieve, if we are looking for the home (Internet) users - it will probably be enough, but still not sure how they are going to convert Ed50  data (such as: Israeli\Europe roads data) to WGS84 usage. for such operations I think they must add more options to their Geographic objects.

Simplicity note:
The thing I like the most is the simplicity in configuring a new point, which probably is a must for an humble-users. you should try this in your application\services. In such object (GLatLng)  the user should know nothing but the service must be more sophisticated.

(*) The Point class was taken from the SharpMap Api.

Saturday, May 17, 2008 5:11:43 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
GIS | Software Development
# Monday, April 21, 2008

The last day of Tech-Ed, two more lectures to go:

TDD, MVP & UX - (by Ron Jacobs)

Ron made a great lecture, about Test-Driven-Development and about having a rich User-interface (or as he called it, not only interface but also experience - with events) but still can test it using Model-View-Presenter pattern. he also explain the differences. Here are some great posts for the differences: Martin Fowler, Alex, Nikola.
He also talked about Passive View. and showed a great code sample (I didn't find the presentation or the code in his blog, The sample was great, I wish it will be uploaded to its blog)

My grade to Ron's lecture: 9/10

 

F# Introduction - (by Luke Hogan)

Luke had a great lecture about the F#. F# is a functional (and Object Oriented) programming language for .Net, which is something very geeky I might say. (you can found his lecture & samples here).
There are some cool things I found useful in this language such as using the let for variable and methods using the same syntax, for example:

let data = (1,2,3)
let g(x) = sum + x*x

the data is immutable by default so it will reduce the frequency of bugs by reducing the amount of special case-code. it is also can be passed between threads easily.
Something else in the F# is the pattern matching you can use (I didn't realy know the syntax so it would be better for you reading the code at Luke's blog).

you can train yourself with F# using this tutorial.

Why using F#? 

it still not so clear for me, but as Luke said: It is a bridge between the the Dev team and the Research Team. Luke also recommended the usage for the F# for Data-Mining because of the pattern matching, and for scientific data analyst.

My Grade to Luke's lecture: 9/10

 

This is the last post for the TechEd week (here is a link to Day 1, Day2).

Monday, April 21, 2008 11:59:12 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
.Net | .Net 3.5 | TDD

This is the main day of TechEd were we had lectures from 8:00 till 19:00 Here are my list of lectures for that day:

Optimizing and Extending ASP.NET Ajax - for going beyond the update panel  - (by Assaf Shely)
This was a lecture of 400, at least that is what they wrote. in reality that was an introduction for Ajax, he explain about the update panel and about JSON. The only thing I want to add from this lecture is all he says about ASP.NET Ajax 3.6 - which can support browser history capabilities.
My grade to Assaf's lecture: 6/10 (a big disappointment)

DDC & ASP.NET MVC (by Noam King)
DDC - dynamic data controls (you can read here), MVC - Model View Controller (you can read more in my last post about ASP.NET MVC).
Noam showed a simple usage of the MVC API, and a simple creation of a web site from the DDC API, those both samples are the simple web casts you can find and learn in 15 minutes. a big waste of time (again)
My grade to Noam's lecture: 8/10 (Noam is a great lecturer, the problem was the level of the lecture - All they should do is to write: Intro at the beginning of the lecture description)

Service Host Customization (by Eyal Vardi)
Finally a great lecture for the second day. It was a great one. you can download the lecture here.
Eyal showed a great sample for Config manager - which helps you manage your configurations details (addresses for example) - and in such way you can manage it inside your DB or something else - better than a configuration file (it gave me some great ideas for my next posts).
He also used the ServiceHost VIsualizer - I even started to use it at my place.
Next we dive into the Service Model Layer and its behaviors.

I'll probably write about each of them in the near future.
For now, there were 4 demos:

Demo 1: CD - Channel dispatcher - writing you own Error Handler, we also talk about the throttling.
Demo 2: Saving persistence of the Service inside a given Service Host.
Demo 3: DR - Object Pooling using the Dispatcher Runtime, it is a great sample.
Demo 4: Serialization Issues - Eyal wrote a sample-infrastructure for handling Serialization and DeSerialization without using the known-types.

Go Gold with Silverlight (by Laurence Moroney)

This was an Introduction to Silverlight (of course), the only thing I liked about the lecture is the way he explained the differences between Silverlight 1.0 to Silverlight 2, while Silverlight 1.0 - is web friendly UI the Silverlight 2 - is .net based programming model with improve productivity. Laurence showed some cool samples (most of them you can find here, here, here and here), the one I liked the most is a Server servlet (written using J2EE) but the client that consume it is a .net web client (Silverlight) - at my place, one of our teamd, has some Java assets and they want to use it, so they start develop their own UI like in Java for movies\Audio\Web-Parts\Ajax capabilities - this sample could help them a lot.

My grade to the Laurence lecture is 7/10 - Laurence was great the problem was the lecture agenda - I really had enough from the Silverlight previews (so either call it preview\intro or show some code in it)

Restfulness (by Ron Jacobs)
First you should read this book (as they said - this is all you need to know about REST)
After David Chappell's lecture about REST for the first day people told me not to take another REST-lecture, but I did - and - IT WAS GREAT!.
you can read more on Avi's post. Ron gave more details about the implementation of REST using the WCF. for example:
How do you notify the sender about error in REST, you can't send XML back to the client... The answer is simple: for example for deleting non-existing row you will get 404 (HTTP Error code) - I might admit I like this one, the problem is that you should write your own fault architecture to return those codes back, _still_ not implemented at the REST attributes of the WCF. (one more sample: an internal error in your code will probably should return 500 - un-handled exception)
Here is another thing that is still not so easy to do in your WCF implementation - how you can ask for a response? for example you would like to get the JSON return value and not the simple xml... in REST - all you need to do is to add the extension to your request, but you still need to implement it in the WebMethodAttribute by yourself.
And there were more samples, you can download them here... (Ron's website). {you can also read  more in Wortzel's post}
My grade to Ron's lecture is: 9/10.

Monday, April 21, 2008 2:56:16 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
.Net 3.5 | Asp.net MVC | C#3.0 | LINQ
# Monday, April 14, 2008

Almost a week after tech-ed but It's better late than never.
Very early this morning we start our way to Eilat, the gang of four I called it, Gabbi Soler (aka. MC. Soler), Doron Yaakobi, Yoav Michaeli and I.

    
     Night before TechEd                   Doron at the morning of The first day


This 5 hours were tremendous, sunny day, cool partners and great subjects for talking, we argued almost about everything, the only thing we agreed about is that we are not agree about anything. Here are some of the subjects for debates:

  • Design using UML VS. Test driven Design Vs. Word-API-design
  • SOA as a one-entrance-point to (varying) many applications Vs. One Big Application
  • Project management - what are the management differences between a small project to a large(huge) one - from  scrum-lovers point of view

The next 3-days are going to be a great fun, as a beginning enjoy the view:

                            The Beauty of Israel #1 - on our way to Eilat


                                 The Beauty of Israel #2 - Still on our way to Eilat...

After almost 5 hours of driving (by Yoav) we finally got to Eilat, at the registration point we got a laptop-bag as a welcome-gift and we went to the opening plenum.
Than we finally start learning, here are the 3 lectures I chose to be at for my first day:

Odyssey in SOA - A Voyage through (by Manu Cohen-Yashar)
Manu explained about the SOA using the MS Tools around us, there are plenty of them and I am sure that such lecture is a great start for the SOA & S+S 3-days-session.
Some of the buzz that were thrown out there are: using ESB for Dynamic routing instead of coding that solution by yourself, I've heard for the first time about ISB - Internet Service bus and Oslo as MS-new-to-come solution. Manu also demonstrate a cool tool by AmberPoint here are some of their products: SOA Monitoring, AmberPoint Express.
Those products can show you everything you would like to know about your services even time of calling, number of errors and flow of calls of each message, this tools can solve many problems when using WF & WCF together. anyway I like the lecture, it was a good start for me cause we are start using WCF & SOA in more places at our systems. anyway there were samples that I wanted to see its code or WF Creations it could be even clearer than its explanations.
My grade to Manu's lecture: 8/10.

 

SOAP\WS* and REST (by David Chappell)
David Chappell had a great show at teched He is a great presenter and he knows how to take some boring subject and make it interesting.
The lecture was talked about the two approaches for Web-Services, the WS* approach and the Rest API. When using WCF you are using, in generally, the WS* approach, with this approach we can choose to use the Reliability, Transactions, Policy etc., but we never asked whether we really need all this stuff in our Web-Services? If your answer is not, so why won't we decrease the size of the request and the response and have something more human-readable such as: REST, (you can read more here).
You can use the simply URI and HTTP methods (Get, Post, Delete etc.) and get back a simple XML, RSS, Json etc. there is no need to send or receive Soap Messages.
In WCF you can easily use the WebGet, WebInvoke, and the ResponseFormat property. I Recommend you to search for the lecture presentation, I would post here link when I'll find it, anyway this is what he said as a conclusion: Rest - can be a good  choice for exposing data over web services, SOAP - can be a good choice for exposing logic\operation.

David Chappell
                      David Chappell in Action - Explaining its lecture agenda.

My grade to David's lecture is 10/10, maybe this is because of the accent-charm but it is a must lecture for those who want to learn about the REST and the WCF connectivity.

 

SQL Server 2008 - what's new in Analysis services
I believe in knowledge, I also believe in learning more tools\products\architecture, so I went to this lecture from the BI session, after half an hour I've found this boring while the presenters only compare between the 2005 to the 2008 version, so I can't even give a short description from this one.


        This is me picturing myself, before the cocktail party (or maybe after...)

After this lecture we went to the cocktail party where I first found Oren Ellenbogen and Aviel. I really missed Oren and it was great to see him and lots fun with them both.

More on the second day at my next posts.

Monday, April 14, 2008 7:51:47 PM (GMT Daylight Time, UTC+01:00)  #    Comments [0] - Trackback
.Net 2.0 | SQL Server 2005 | WCF
Archive
<December 2008>
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Shani Raba
Sign In
Statistics
Total Posts: 134
This Year: 1
This Month: 0
This Week: 0
Comments: 97
Cool Stuff
Add to Technorati Favorites
Themes
Pick a theme:
All Content © 2010, Shani Raba
DasBlog theme 'Business' created by Christoph De Baene (delarou)