Viser innlegg med etiketten cx. Vis alle innlegg
Viser innlegg med etiketten cx. Vis alle innlegg

onsdag 8. februar 2012

Erfaringer med trusselmodellering

Sammendrag av presentasjonen min på Software 2012 - Erfaringer med trusselmodellering.

Trusslemodellering er en plattform for kommunikasjon. Kunden lurer på hvordan problemer er løst, og leverandøren har behov for å forklare det samme, og i tillegg belyse antagelser og konsekvenser av endringer. En slik plattform er nyttig gjennom hele livssyklusen, og kanskje særlig som dokumentasjon av tidligere avgjørelser.

En veldig viktig egenskap ved en trusselmodell, er konsistens mellom opptegning av systemet, og analysen av det. Derfor er det nyttig å bruke et verktøy som besørger denne konsistensen, og synliggjør eventuelle avvik. Truslene kan modelleres med "STRIDE"-prinsippene: spoofing, tampering, repudiation, information disclosure, denial of service og elevation of privilege. Hvert av disse appliseres til de forskjellige delene av systemet, som er modellert med komponenter som dataflyt, prosesser, aktører og datalager.

Gjennom analysen kommer man frem til diverse tiltak som er gjort tidligere. Av og til finner man også mangler. Modellen beskriver hvor inndata kommer fra eksterne aktører. Generelt fins det flere aspekter som kan tas ut som forskjellige rapporter som passer ulike roller, feks arkitekt, funksjonelt ansvarlig, kundens sikkerhetsansvarlig, prosjektleder etc.

Ved å bruke en dedikert applikasjon til trusselmodellering er det også enklere å oppdatere og endre modellen. Mangler og endringer blir svært synlige i analyse-bildet, og lar seg enkelt oppdatere. Dermed er det også enkelt å "holde liv" i modellen.

Dessuten er denne prosessen en veldig nyttig kunnskapsdeling mellom kunde og leverandør. Kunden (eller driftsleverandøren) synliggjør situasjonen i produksjonsmiljøet. Leverandøren viser hvordan løsningen opprinnelig var planlagt. Prosessen fører til en dyptgående modell av den eksisterende situasjonen i produksjon.

Disse erfaringene er basert på bruk av Microsoft SDL Threat Modelling Tool.

torsdag 7. april 2011

3xP: Predicting production performance pt. 2

In my previous post, I ranted on about testing environments, and how everything would look like if us tech nerds were to run a project. Well .. everything would be tested and running smoothly, but the users might not enjoy the command line interface.

Anyway, what to do when you're unable to reproduce performance issues that appear in production, disregarding excuses and previous assumptions ?

There are a number of non-intrusive metrics that is - or should be - available from your production environment. These should be used to monitor the application, and warn whenever something is about to come out of control.

But since we're already working on this - I guess the metrics failed, or someone did ignore the alerts and flags and whistles. Here's my short recipe for finding performance bottle necks:

1) Draw a diagram of the application stack
2) Map out the different diagnostics available from each layer
3) Figure out if each layer itself believes it is healthy
4) Let each layer figure if the layer below is healthy
5) Start fixing issues from the bottom. With each change, re-assert that the layers below still are hearty.

A typical example would be a long-running sql statement. It would be visible in database monitoring tools, and easily fixed either in the database or by altering the statement. Good.

But it's still a bottle neck. Why? Looking good at the data layer, there may still be issues with transporting the query results to the application server. So, next you look at the database driver, and see that there are a lot of result pagination. You query yielding 20 000 rows gets paginated into 1000 chucks of 20 rows.

So you fix the prefetch size, and now things run a bit smoother. But there's still some issues, because instantiating all of these results can take a while.

So you may be altering the data transfer model to be be more precise of which objects to fetch. But in doing so, you complicate the query again, yielding longer execution time ..

And so on you weave a path upwards to the application level, possibly introducing and resolving several issues as you go. This process is orders of magnitude simpler if you are able to simulate the results instead of actually deploying small fixes to production. In addition, you may unknowingly touch upon stuff that break other performance metrics. So again - monitoring of the entire stack is crucial.

Finally, when you reach a conclusion and have solved all of the current issues - ensure that your current footprint or benchmark is monitored for changes. Future maintenance and development will surely introduce new issues. Get at them early instead of letting them grow and interweave with each other. Then your next job won't be untying complicated knots of system behavior.

fredag 1. april 2011

3xP: Predicting production performance pt. 1

I've recently worked a bit on performance tuning several applications that have been in production for several years. They range from 70 users to 3000 users, but have one thing in common: None of them have a performance management scheme.

Of course, it comes down to a question of cost. To be able to make, say, 99% correct predictions of how a system will perform, you need to run a bunch of tests in a sensible environment. There are two cost drivers: creating and managing the tests, and acquiring and maintaining the environment.

Creating load tests for a huge custom made application in three weeks is not possible. There are so many tweaks and processes and different behavior, that you'd need a load of domain experts just to tell you about all the things you can do. If the load tests were written in parallel with development, it would at least be possible to get somewhat complete coverage. But that's a huge overhead that cannot be added to the vendor budget. And the customer didn't specify inferior performance, so why should they take the cost?

I guess the lesson learned is that "good" performance may be governed by a tedious technical project management. Great performance has to be a concern even wider than the project scope, also including pre- and post-processes.

The second cost driver - environment - requires the first driver to be implemented. No need for realistic testing if you don't have a clue of what to test. But if you do - having a faulty or incorrectly scaled environment gives you either a number of falsely positive performance issues to solve, or a number of excuses for bad testing results. None of which is a good thing.

So, if you got your tests - do go the extra mile and ensure that the environment in which they are running is enabling you to do realistic testing and get correct predictions.

tirsdag 1. februar 2011

Oracle Identity Management - Governance, Risk and Compliance Architecture



I'll have to admit that my primary reason for reading this book was not to kindle my knowledge of Oracle products, but rather get a picure of the IAM world. That proved a bit difficult, because it was not clear how the O-IAM model connected to the non-vendor-specific side of things. Not very suprising, but the foreword do describe the book as definitive guide. I'd recon the book would have been better with a "middle tier" of conceptual IAM.

onsdag 12. januar 2011

Java EE6 with GlassFish 3 Application Server review



Just got through this interesting book. It provides a quite nice perspective on a default set of tools for web application development in Java. Obviously focused on config and deployment of GF, the book also covers JSP, JSF, taglibs, messaging, security, ejb, cdi and web services. Althought all very familiar topics, it's nice to have a collection to point to for referencing these proven technologies. It should be pointed out that there are no comprehensive code appendixes in the book. So it's not bloated with code, but on the other hand it's not entirely clear how web services and messaging fit into the big picture.

The primary audience of this book is web developers wanting to move a bit towards the server side, learning how to integrate scalable data providers into their applications. I'll be recommending this book to a couple of web developers.

fredag 22. oktober 2010

Knowledge sharing days

Today is of our knowledge sharing days in Computas. I haven't reflected on the actual value of such days before, except the practical value of giving and attending lectures and talks.

But today I discovered that there is actually more to it than just the knowledge sharing. Being away from your current project, you get to reflect on things that are not immediatly useful to your work, but rather expands your horizon on other topics.

Such a day differs from a day at a conference in that you feel free from an obligation to learn directly useful stuff. So, with this new state of mind I got to attend .NET sessions, project management sessions and sales sessions.

And guess what - I actually learned a lot more than I expected! There are so much knowledge around that will come in handy at some point, which you never can afford spending time on learning in a normal day. But when disconnected from everyday obligations, the mind seeks other kinds of producing useful thoughts, and so attending sessions from other fields than your primary becomes so much more efficient!

So, today I'm truly appreciating this opportunity to learn something that belongs to another everyday set of mind. +1 for Computas :)

torsdag 23. september 2010

JavaOne 2010 tag cloud

I'm trying to grasp the trends of JavaOne 2010, and I figured it would be a cool approach to create a tag cloud. So - here it is: Tag cloud composed of the titles of all JavaOne 2010 sessions.




created at TagCrowd.com


onsdag 22. september 2010

JavaOne 2010 day 2

Attended a great session on ESB best practices by Earl Nolan and Monal Daxini. Then some REST stuff of various quality. The big thing of the day was the general technical session with Mark Reinhold.

Most of the presented material were old news: Java SE 7 and EE 6. I guess the value of it is to say it's still in the pipeline. SE7 is now planned released in 2011 and SE8 in 2012. I.e. lambda expressions has been postponed till the 2012-release.

The session also had a nice and rather technical twitter client demo which can be found at https://glassfish.dev.java.net/twitterdemo

tirsdag 21. september 2010

JavaOne day 1



What's better than a day full of Java? Such a day, and an BOF evening cruise on the bay :)

Contemplating on how many participants there are on these conferences, we figured about 60 000. That's a lot of hotel rooms being occupied, dinner services etc. But then there's not a room available anywhere in the city. Wonder what happens when everyone goes home on Friday ..

mandag 20. september 2010

JavaOne 2010 !


Yess! I'm here at Hilton Hotel, San Francisco, ready for 5 days of concentrated Java juice! Tonight at 0530 pm Larry will kick off the show, and we'll be ramlin' down a path of tech discussions over an Anchor Steam pint. This will definitely be awesome!

fredag 20. august 2010

Presenting a RESTful web service

Lately I've been pondering on how to create a unambigious description for the RESTful web service I am designing. The kink is to create a description that will work both ways: For consumbers AND producers. In addition it should be easy to maintain and develop.

So I figured that there is a description language called WADL - Web Application Description Language. Suitable for REST they say. Great indeed, but as it is not a formal standard, there are very few tools supporting the format. I.e. neither MagicDraw nor XmlSpy supports designing a service, Microsoft Visual Studio doesn't seem to support. For Java, there's wadl2java, which generates the services proxies. But still there's no design tool.

GlassFish and maven-wadl-plugin can reverse engineer your annotations, and create a WADL describing your service. If you implemented it with JAX-RW. My service was already tentatively implemented using Spring Web, so no luck.

A lot of services offered "in the cloud", or as we said previously "on the Internet", have textual descriptions for their APIs. Such services include Google Search API, Twitter, Flickr, Sun Kenai etc. But textual descriptions can be ambigious if not carefully written, expecially when it comes to describing message exchange formats. For message consumers, this is probably a reasonable tradeoff. But having several producers, this would most certainly lead to ambigious services.

So, my solution was to 1) describe the services/resources as text in the API document, and 2) describe the resource models/message formats using XSD. XSD have wide tooling support. This takes us where we want to be.

The next step would be to hand-craft the WADL using the generated XSDs, but I'll leave that as an excercise to the reader :)

fredag 2. juli 2010

JavaZone 2010 accept

Great, two of my collegues at Computas and me got accepted each our talk for the JavaZone-conference in Oslo 8-9. september. The three of us will contribute with these presentations:

Geir A. Lund:
Erfaring med konvertering fra CVS til Mercurial i stort Javaprosjekt

Filip van Laenen:
Why We Should Start Tagging Our Code

Harald Søvik:
Enhance your Maven plugins with Groovy

Along with a small army of other experts and geeks, we will fill the venue with experience, knowledge and pure java-happiness for two entire days. Don't miss out on this event - it's probably the best java conference in this part of the galaxy :)

onsdag 16. juni 2010

NDC2010 material

Here are some material that will be referred to in Mortens and my talk at NDC2010:

The slides for Modularization, testing and technical debt (in a large agile project) is available at http://www.slideshare.net/harals/modularization-testing-and-technical-debt-in-a-large-agile-project

A whitepaper on the same topic (from the proceedings of the XP2010-conference) can be found at http://www.slideshare.net/harals/cou

tirsdag 25. mai 2010

XP2010 accept

The 11th International Conference on Agile Software Development is coming up (June 1-4 in Trondheim). Unfortunately, I will not be able to be there. But I have been authoring and co-authoring some material for the conference.

First, Morten's and my experience report "Tech Challenges in a Large-Scale Agile Project" was accepted, and will be both presented and included in the conference proceedings:

This experience reports focuses on the major technical challenges that arose during the project, especially those challenges that we think can be attributed to the SCRUM methodology. For each of them, we try to identify the consequence and the cause, and then follow up with any solutions we tried, and an analysis of whether the problem was successfully solved or not. The session paper lists three major examples of such problems.

Then, I got accepted a lightening talk as well: "Agile Methods may Discourage Quality". However, since I have to be attending a customer at the time, Morten will be presenting this instead of me.

Agile methods, and in particular scrum, have a very strong focus on productivity and immediate business value. The developers are encouraged to complete their tasks in due time, and this may lead to quick and dirty solutions. Thus, a quality assurance system is required to ensure that technical quality is within required bounds. This system may be implemented through pair programming, code review, design review etc. It is crucial that whatever QA systems one choose, it has strong enough authority to inflict a decrease in focus factor, or even a postponed deadline.

Cheers and good luck to you all in Trondheim! See http://xp2010.org/

mandag 5. april 2010

NDC 2010 accept

Against all odds (?) - Mortens and my paper ("Modularization, Testing & Technical Debt in a Large Agile Project") was accepted for the Nordic Developer Conference 2010. Well then, even though it's experiences from a Java project presented at a .Net conference, both sides has the agile dimension in common.

But it's still somewhat comical to present in "the dragon's lair". The presentations is scheduled for day 2, track 2 at 11:40 - in parallel to Eric Evans .. yikes.

The abstract reads:

This experience reports focuses on the major scrum–related technical challenges that arose during a 120 000 hour scrum controlled project. For each of them, we try to identify the cause and the consequence, and then follow up with any solutions we tried. Finally we sum up and assess whether the problem was successfully solved or not.


In addition, my colleague Filip van Laenen was accepted with his presentation "Distributed Computing 2.0". See http://www.ndc2010.no

fredag 13. november 2009

Twitter programming session

Last night I had a live programming session with ~30 CS students at the University of Oslo. The goal was to show how easy it is to interact with RESTful webservices in Java. I started out with explaining about HTTP and Jersey, REST vs SOAP, JSON vs XML and jsonlib vs jaxb. Those were the major design decisions.

I subsequently implemented a bot that would befriend anyone that was following the bot. Doing this with jsonlib was pretty straightforward, but showed the weakness of not having a higher level abstraction of the domain. Therefore, the next bot would get status updates from his friends timeline, and show them in a simple GUI. This proved a lot smoother when jaxb was at work, because it created two separate layers: one interacting with twitter restful webservices, and another showing model objects in the GUI. Last I showed a bot that used twitters search api to follow a trending topic.

Overall it was a good session, but I think it was a little bit too packed with technology choices. I guess it would have been of greater value to just show the magic of jaxb, and skip the primitive alternative.

The javabots is available for download at http://bit.ly/FyeqT for a while.

torsdag 29. oktober 2009

Scrum and Technical Debt

This years Smidig-conference is over, and I've had a week to digest the impressions. Overall it was a great experience. Lots of lightning talks, open space discussions and even some beer. My talk on Scrum and Technical Debt created some fuzz in the following open space discussion, so I guess it must have stroken s chord in some of the listeners :)

Janniche from Bekk challenged me on my claims, and frankly I think she may have a point. She argued that if tech debt seems to hide away in scrum, we are using scrum in the wrong manner. Technical debt should be up front, and thus decrease the focus factor. It requries developers to be honest and professional about their craftmanship. So maybe we should spend some hours on tutoring instad of repairing old defects ..

The presentation is unfortunately not available on video, but the slides can be found at http://www.slideshare.net/harals/scrum-skjuler-teknisk-gjeld-2277766